.class public final Lnbisdk/gq;
.super Ljava/lang/Object;


# instance fields
.field private jB:Lnbisdk/jz;

.field private jC:Lnbisdk/fm;


# direct methods
.method private constructor <init>(Lnbisdk/jz;)V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lnbisdk/gq;->jB:Lnbisdk/jz;

    return-void
.end method

.method public static a(Lnbisdk/jz;Lnbisdk/ou;)Lnbisdk/fk;
    .locals 12
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lnbisdk/rp;,
            Lnbisdk/rt;
        }
    .end annotation

    const/4 v11, 0x4

    const/4 v10, 0x0

    new-instance v0, Lnbisdk/gq;

    invoke-direct {v0, p0}, Lnbisdk/gq;-><init>(Lnbisdk/jz;)V

    :try_start_0
    invoke-static {p1}, Lnbisdk/pc;->b(Lnbisdk/ou;)J

    move-result-wide v1

    long-to-int v1, v1

    if-gtz v1, :cond_0

    new-instance v1, Lnbisdk/ih;

    invoke-direct {v1}, Lnbisdk/ih;-><init>()V

    throw v1
    :try_end_0
    .catch Lnbisdk/rp; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lnbisdk/rt; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2

    :catch_0
    move-exception v0

    throw v0

    :cond_0
    :try_start_1
    new-array v2, v1, [I

    move v3, v10

    :cond_1
    if-ge v3, v1, :cond_3

    invoke-virtual {p1}, Lnbisdk/ou;->readByte()B

    move-result v4

    sub-int v5, v1, v3

    if-le v5, v11, :cond_2

    move v5, v11

    :cond_2
    const/4 v6, 0x3

    :goto_0
    sub-int v7, v11, v5

    if-lt v6, v7, :cond_1

    shl-int/lit8 v7, v6, 0x1

    add-int/lit8 v7, v7, 0x1

    ushr-int v7, v4, v7

    and-int/lit8 v7, v7, 0x1

    shl-int/lit8 v8, v6, 0x1

    ushr-int v8, v4, v8

    and-int/lit8 v8, v8, 0x1

    add-int/lit8 v9, v3, 0x1

    shl-int/lit8 v8, v8, 0x1

    or-int/2addr v7, v8

    aput v7, v2, v3

    add-int/lit8 v3, v6, -0x1

    move v6, v3

    move v3, v9

    goto :goto_0

    :cond_3
    new-array v3, v1, [Lnbisdk/pe;

    move v4, v10

    :goto_1
    if-ge v4, v1, :cond_5

    invoke-static {p1}, Lnbisdk/pc;->b(Lnbisdk/ou;)J

    move-result-wide v5

    long-to-int v5, v5

    iget-object v6, v0, Lnbisdk/gq;->jB:Lnbisdk/jz;

    invoke-virtual {v6, v5}, Lnbisdk/jz;->ay(I)Lnbisdk/pe;

    move-result-object v5

    if-nez v5, :cond_4

    new-instance v1, Lnbisdk/ng;

    invoke-direct {v1}, Lnbisdk/ng;-><init>()V

    throw v1
    :try_end_1
    .catch Lnbisdk/rp; {:try_start_1 .. :try_end_1} :catch_0
    .catch Lnbisdk/rt; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    :catch_1
    move-exception v0

    throw v0

    :cond_4
    :try_start_2
    aput-object v5, v3, v4

    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    :cond_5
    new-instance v1, Lnbisdk/fm;

    invoke-direct {v1, v2, v3}, Lnbisdk/fm;-><init>([I[Lnbisdk/pe;)V

    iput-object v1, v0, Lnbisdk/gq;->jC:Lnbisdk/fm;

    iget-object v1, v0, Lnbisdk/gq;->jC:Lnbisdk/fm;

    iget v1, v1, Lnbisdk/fm;->hX:I

    iget-object v2, v0, Lnbisdk/gq;->jB:Lnbisdk/jz;

    const-string v3, "obsecurity"

    invoke-virtual {v2, v3}, Lnbisdk/jz;->af(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_6

    new-instance v2, Lnbisdk/d;

    invoke-direct {v2, p1}, Lnbisdk/d;-><init>(Lnbisdk/ou;)V

    :goto_2
    new-array v1, v1, [[B

    move v3, v10

    :goto_3
    array-length v4, v1

    if-ge v3, v4, :cond_8

    invoke-virtual {v2}, Lnbisdk/pt;->kd()[B

    move-result-object v4

    aput-object v4, v1, v3

    add-int/lit8 v3, v3, 0x1

    goto :goto_3

    :cond_6
    new-instance v2, Lnbisdk/pt;

    invoke-direct {v2, p1}, Lnbisdk/pt;-><init>(Lnbisdk/ou;)V
    :try_end_2
    .catch Lnbisdk/rp; {:try_start_2 .. :try_end_2} :catch_0
    .catch Lnbisdk/rt; {:try_start_2 .. :try_end_2} :catch_1
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_2

    :catch_2
    move-exception v1

    sget-boolean v2, Lnbisdk/bk;->DEBUG:Z

    if-eqz v2, :cond_7

    invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v1

    const-wide/high16 v2, 0x4000

    const/4 v4, 0x2

    invoke-static {v1, v2, v3, v4}, Lnbisdk/pn;->a(Ljava/lang/String;JB)V

    :cond_7
    :goto_4
    iget-object v0, v0, Lnbisdk/gq;->jC:Lnbisdk/fm;

    iget-object v0, v0, Lnbisdk/fm;->hV:[Lnbisdk/am;

    aget-object v0, v0, v10

    return-object v0

    :cond_8
    :try_start_3
    iget-object v2, v0, Lnbisdk/gq;->jC:Lnbisdk/fm;

    iput-object v1, v2, Lnbisdk/fm;->hW:[[B
    :try_end_3
    .catch Lnbisdk/rp; {:try_start_3 .. :try_end_3} :catch_0
    .catch Lnbisdk/rt; {:try_start_3 .. :try_end_3} :catch_1
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2

    goto :goto_4
.end method
